'use strict';

import React, { Component } from 'react';
import classNames from '../../../utils/classNames';

import './Model.scss';

export default  class Model extends Component {
	
	render(){
		let { show } = this.props;

		document.documentElement.style.overflowY=show?'hidden':'auto';
		//alert(document.documentElement.getBoundingClientRect().height)
		return (
			<div role="dialog" 
				className={classNames("model",{open:show})}>
				{ this.props.children }
			</div>
		);
	}
}
